<template>
  <div>
    <h3>{{ msg }}</h3>
    <button @click="fanzhuan">逆转世界</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "hello,world",
    };
  },
  methods: {
    // split 切割 reverse 翻转  join拼接
    fanzhuan() {
      this.msg = this.msg.split("").reverse().join("");
    },
  },
};
</script>

<style scoped></style>
